package com.lc.luzhengtang.conn;

import android.util.Log;

import com.google.gson.Gson;
import com.lc.luzhengtang.bean.CommenBean;
import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2017/4/17.
 */
@HttpInlet(Conn.Url_Get_Goods_Num)
public class GetUpdateCartGoodsNum extends BaseAsyPost<CommenBean> {
    public String member_id;
    public String id;
    public String number;

    public GetUpdateCartGoodsNum(String member_id, String id, String number, AsyCallBack<CommenBean> asyCallBack) {
        super(asyCallBack);
        this.member_id = member_id;
        this.id = id;
        Log.d("GetUpdateCartGoodsNum", "number = " + number);
        this.number = number;
        Log.d("GetUpdateCartGoodsNum", "this.number = " + this.number);
    }

    @Override
    protected CommenBean parser(JSONObject object) throws Exception {
        /*if(object.getInt("code")==200){
            int code = object.getInt("code");
            String message = object.getString("message");
            CommenBean updataNum=new CommenBean(code,message);
            return  updataNum;
        }
        return null;*/

        Log.d(object.toString(),"33333333333333333");
        Log.d(object.toString(),"33333333333333333");
        Gson gson = new Gson();
        CommenBean commenBean = new CommenBean();

        commenBean = gson.fromJson(object.toString(), CommenBean.class);

        return commenBean;

    }
}
